<{include file="Public/top.html"}>
<style>
    .album{overflow-x: auto;}
    .album img{width: 80px;}
</style>
</head>
<body>
<div id="warpper">
    <div class="content">
        <div class="location">游戏管理</div>

        <{include file= "User/nav.html"}>

        <div class="filedSet" style="padding-bottom: 0;">
            <div class="search">
                <form action="" method="post" class="ui-form reportForm" id="searchForm">
                    <input name="m" type="hidden" value="<{$module}>">
                    <input name="c" type="hidden" value="<{$controller}>">
                    <input name="a" type="hidden" value="<{$action}>">

                    <input name="p" id="page" type="hidden" value="<{$page|default:1}>">
                    <input name="limit" id="limit" type="hidden" value="<{$limit|default:10}>">
                    <input name="ofield" id="ofield" type="hidden" value="<{$ofield}>">
                    <input name="otype"  id="otype"  type="hidden" value="<{$otype}>">

                    <div class="ui-form-item inline-block">
                        <label class="ui-label">审核状态</label>
                        <select name="auditStatus" class="ui-select" style="width: 160px;">
                            <{html_options options=$auditType selected=$selectedAuditType}>
                        </select>
                    </div>

                    <div class="ui-form-item inline-block">
                        <button type="submit" class="ui-button" onclick="LayerShow();">查询</button>
                    </div>
                    <div class="ui-form-item inline-block">
                        <button type="button" id="adduserBtn" class="ui-button" onclick="LayerShow();">添加明星</button>
                    </div>
                </form>
            </div>
        </div>
        <!--表格内容-->
        <div class="mainGrid">
            <table class="ui-table ui-body">
                <thead>
                <tr>
                    <th class="pct5">编号</th>
                    <th class="pct10">寻找对象</th>
                    <th class="pct10">图集</th>
                    <th class="pct5">设置</th>
                    <th class="pct5">状态</th>
                    <th class="pct10 last-col">操作</th>
                </tr>
                </thead>
                <tbody>
                <{foreach from=$list item=item}>
                <tr>
                    <td><{$item.gid}></td>
                    <td><{$item.target}></td>
                    <td class="album">
                        <{foreach from=explode(',',$item.album) item=pic}>
                            <img src="<{$pic}>" />
                        <{/foreach}>
                    </td>
                    <td>
                        奖金：<{$item.totalPrize}><br />
                        红包数量：<{$item.packNum}><br />
                        最小红包：<{$item.packMin}><br />
                        <{if $item.hasPay}>已支付<{else}>未支付<{/if}>
                    </td>
                    <td><{$auditType[$item.audit]}></td>
                    <td class="ta_l">
                        <div class="handler">
                            <{if $item.status != $smarty.const.ENABLE_ENABLE}>
                            <a href="<{u('gameUpdate/?gid='|cat:$item['gid'])}>" onclick="if(!confirm('确定审核通过该游戏吗？'))return false;">通过</a>
                            <{else}>
                            <a href="<{u('gameUpdate/?gid='|cat:$item['gid'])}>" onclick="if(!confirm('确定拒绝该游戏吗？'))return false;">不通过</a>
                            <{/if}>
                        </div>
                    </td>
                </tr>
                <{/foreach}>
                </tbody>
            </table>
        </div>
        <!--描述：分页-->
        <div class="pagination">
            <{include file="Public/page.html"}>
        </div>

    </div>
</div>
<script>
    $('#adduserBtn').click(function(){
        location.href="<{u('userAdd')}>";
    });
</script>
</body>
<{include file="Public/foot.html" }>